const unsigned char SHAKE_1 = 0x01;
const unsigned char SHAKE_2 = 0x02;
const unsigned char SHAKE_3 = 0x03;
const unsigned char WAVE_1 = 0x04;
const unsigned char WAVE_2 = 0x05;
const unsigned char WAVE_3 = 0x06;
const unsigned char WAVE_4 = 0x07;
const int MAX_WAIT_TIME = 500;
const int MAX_WAVE_TIME = 2000;
const unsigned char PKT0 = 0x10;
const unsigned char PKT1 = 0x11;
const unsigned char ACK0 = 0x12;
const unsigned char ACK1 = 0x13;
const unsigned char NAK = 0x14;
const unsigned char LAST = 0x20;
const unsigned char MIDDLE = 0x21;
const int MAX_LEN = 10000;

unsigned char checksum(char* package, int len);